<html>

<head>
    <link rel="stylesheet" href="../../normalize.css">
    <link rel="stylesheet" href="../../index.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>

    <div id="example">
        <div v-bind:class="[activeClass, errorClass]"></div>

        <div v-bind:class="[isActive ? activeClass : '', errorClass]"></div>
    </div>

    <script type="text/javascript">
        var vm = new Vue({
            el: '#example',
            data: {
                activeClass: 'active',
                errorClass: 'text-danger',
                isActive: 1 == 2
            }
        });
    </script>
</body>

</html>